/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package actioncombination.logic.agent.action;

import actioncombination.common.datastructure.DataStructure;
import actioncombination.common.value.Value;
import actioncombination.logic.agent.action.Action;
import java.util.ArrayList;

/**
 *
 * @author Administrador
 */
public abstract class ActionDirection extends Action {

    private ArrayList typesOfAngles;

    public ActionDirection(ArrayList typesOfAngles) {
        this.typesOfAngles = typesOfAngles;
    }

    public ActionDirection() {
    }

    protected int getActionIndex(Value angle) throws Exception {
        for (int i = 0; i < typesOfAngles.size(); i++) {
            if (angle == typesOfAngles.get(i)) {
                return i;
            }
        }
        throw new Exception("no existe ese angulo en la lista");
    }

    public ArrayList getTypesOfAngles() {
        return typesOfAngles;
    }

    public void setTypesOfAngles(ArrayList typesOfAngles) {
        this.typesOfAngles = typesOfAngles;
    }
}
